import { axios } from '@/utils/request'

/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getPage (parameter) {
    return axios({
      url: '/StaffAttendance/Page',
      method: 'get',
      params: parameter
    })
  }
  
/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function addPage (parameter) {
    return axios({
      url: '/StaffAttendance/Add',
      method: 'post',
      data: parameter
    })
  }

  
/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function editPage (parameter) {
    return axios({
      url: '/StaffAttendance/Edit',
      method: 'post',
      data: parameter
    })
  }

  /**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function deletePage (parameter) {
    return axios({
      url: '/StaffAttendance/Delete',
      method: 'post',
      data: parameter
    })
  }


/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getStaffAttendanceRuleInfo (parameter) {
  return axios({
    url: '/StaffAttendance/GetStaffAttendanceRuleInfo',
    method: 'get',
    params: parameter
  })
}

/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getStaffAttendanceRecord (parameter) {
  return axios({
    url: '/StaffAttendance/GetStaffAttendanceRecord',
    method: 'post',
    data: parameter
  })
}


/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function childAttendancePage (parameter) {
  return axios({
    url: '/ChildAttendance/Page',
    method: 'get',
    params: parameter
  })
}

/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getChildAttendanceRule (parameter) {
  return axios({
    url: '/ChildAttendanceRule/Get',
    method: 'get',
    params: parameter
  })
}

/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function addChildAttendanceRule (parameter) {
  return axios({
    url: '/ChildAttendanceRule/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getStaffAttendanceRecordByUserId (parameter) {
  return axios({
    url: '/StaffAttendance/GetStaffAttendanceRecordByUserId',
    method: 'post',
    data: parameter
  })
}
/**
 * 查询
 *
 * @author oo
 * @date 2020/5/25 01:31
 */
export function getChildAttendanceDetail (parameter) {
  return axios({
    url: '/ChildAttendance/Detail',
    method: 'get',
    params: parameter
  })
}

/**
 * 导出幼儿考勤
 *
 * @author yubaoshan
 * @date 2021/5/30 18:03
 */
export function ChildrensRecordExport(parameter) {
  return axios({
    url: `/StaffAttendance/AttendanceChildrensRecordExcelModel?month=${parameter.month}`,
    method: 'post',
    responseType: 'blob'
  })
}

/**
 * 导出员工考勤
 *
 * @author yubaoshan
 * @date 2021/5/30 18:03
 */
export function RecordExport(parameter) {
  return axios({
    url: `/StaffAttendance/AttendanceRecordExcelModel?month=${parameter.date}`,
    method: 'post',
    responseType: 'blob'
  })
}